<template>
  <a-upload action="/" :custom-request="customReques" :on-before-remove="beforeRemove" :file-list="fileList" accept=".xls">
    <template #upload-button>
      <a-button type="primary" status="warning">
        <template #icon>
          <icon-plus />
        </template>
        选择excel文件
      </a-button>
    </template>
  </a-upload>
</template>
<script lang="ts">
import { toRefs } from 'vue';
import importConfigFunction from './uploadExcel.ts';
export default {
  props: {
    imgList: {
      type: Object,
      default: null,
    },
  },
  setup(props, option) {
    const { base, customReques, beforeRemove, getUpdata } = importConfigFunction(props, option);

    return {
      ...toRefs(base),
      customReques,
      beforeRemove,
      getUpdata,
    };
  },
};
</script>

<style scoped></style>
